[?php if ($field->isPartial()): ?]
  [?php include_partial('<?php echo $this->getModuleName() ?>/'.$name, array('form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?]
[?php elseif ($field->isComponent()): ?]
  [?php include_component('<?php echo $this->getModuleName() ?>', $name, array('form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?]
[?php else: ?]
  <div class="ui-form-field">
      [?php echo $form[$name]->renderLabel($label, array('class' => 'ui-label')) ?]

    [?php echo $form[$name]->render($attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes) ?]

        [?php echo $form[$name]->renderError() ?]

    [?php if ($help): ?]
    <div class="ui-input-description">[?php echo __($help, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]</div>
    [?php elseif ($help = $form[$name]->renderHelp()): ?]
    <div class="ui-input-description">[?php echo $help ?]</div>
    [?php endif; ?]
  </div>
[?php endif; ?]
